﻿@model S4Store.Models.AfterSaleReport.AfterSaleHealthyCarTypeModel
@{
    Layout = null;
    ViewBag.Title = "SaleTimeRate";
    var container = "div" + Guid.NewGuid().ToString();
}
<div style="height:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)

<div style="position:relative; width:100%">
    @{

        S4Store.Models.Chart.Column ChartModel = new S4Store.Models.Chart.Column();
        ChartModel.Colors = new List<string> { S4Store.Models.Chart.Color.Green, S4Store.Models.Chart.Color.Blue };
        //ChartModel.Name = "登记客户";
        ChartModel.YAxis = "事故车维修业绩车型PI";
        //ChartModel.Width = 500;
        //ChartModel.Height = 300;
        ChartModel.XAxis.Add("事故车台次完成进度差");
        ChartModel.XAxis.Add("事故车产值完成进度差");

        S4Store.Models.Chart.ChartSeries series1 = new S4Store.Models.Chart.ChartSeries();
        series1.Name = "考核目标";
        series1.Data.Add(ViewBag.时间进度*100);
        series1.Data.Add(ViewBag.时间进度*100);
        ChartModel.Serieses.Add(series1);


        S4Store.Models.Chart.ChartSeries series2 = new S4Store.Models.Chart.ChartSeries();
        series2.Name = "实际完成";
        series2.Data.Add((Model.应时台次==0?0:((decimal)Model.实际台次 / (decimal)Model.应时台次))*100);
        series2.Data.Add((Model.应时产值 == 0 ? 0 : Model.实际产值 / Model.应时产值)*100);
        ChartModel.Serieses.Add(series2);
    
    
        @Html.Partial("../Chart/Column", ChartModel)
        <div style=" margin-left:70px; overflow:hidden">
        <table style="width:100%">
            <tr>
                <td align="center" width="30">
                @if (Model.实际台次 < Model.应时台次)
                {
                    <a class="specialRed" href="@Url.Action("AccidentCars_RCTC", new { Month = Model.BarModel.Month.ToString("yyyy-MM-dd") })" target="navtab" title="事故车台次完成进度差">
                        <div class="value">@(Model.实际台次 - Model.应时台次)</div>
                        <div class="rt">实际台次：@Model.实际台次</div>
                        <div class="rb">应时台次：@Model.应时台次</div>
                    </a>
                }
                else
                {
                    <a class="specialGreen" href="@Url.Action("AccidentCars_RCTC", new { Month = Model.BarModel.Month.ToString("yyyy-MM-dd") })" target="navtab" title="事故车台次完成进度差">
                        <div class="value">@(Model.实际台次 - Model.应时台次)</div>
                        <div class="rt">实际台次：@Model.实际台次</div>
                        <div class="rb">应时台次：@Model.应时台次</div>
                    </a>
                }

                </td>
                <td align="center" width="30">
                @if (Model.实际产值 < Model.应时产值)
                {
                    <a class="specialRed"  href="@Url.Action("AccidentCars_CZ", new { Month = Model.BarModel.Month.ToString("yyyy-MM-dd") })" target="navtab" title="事故车产值完成进度差">
                        <div class="value">@(Model.实际产值 - Model.应时产值)</div>
                        <div class="rt">实际产值：@Model.实际产值</div>
                        <div class="rb">应时产值：@Model.应时产值</div>
                    </a>
                }
                else
                {
                    <a class="specialGreen"  href="@Url.Action("AccidentCars_CZ", new { Month = Model.BarModel.Month.ToString("yyyy-MM-dd") })" target="navtab" title="事故车产值完成进度差">
                        <div class="value">@(Model.实际产值 - Model.应时产值)</div>
                        <div class="rt">实际产值：@Model.实际产值</div>
                        <div class="rb">应时产值：@Model.应时产值</div>
                    </a>
                }
                </td>
            </tr>
        </table>
        </div>
        
    }
    
</div>
</div>

